/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package agents;

import java.io.IOException;
import env.Action;
import env.Enviroment;
import java.util.Scanner;

/**
 *
 * @author orcas
 */
public class HumanAgentConsole extends Agent {

    public HumanAgentConsole(String name, int row, int col) {
        super(name, row, col);
    }

    public Action getMove() {
        System.out.println(this + ": please enter W/A/D");
        Scanner sc = new Scanner(System.in);
        switch (sc.next().toLowerCase().charAt(0)) {
            case 'w':
                return Action.up;
            case 'a':
                return Action.left;
            case 's':
                return Action.down;
            case 'd':
                return Action.right;
            case 'q':
                System.exit(0);
        }
        return null;

    }
}
